package com.mark.admin.kafka;

import com.mark.common.kafka.KafkaListener;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.stereotype.Component;

/**
 * @Description :  java类作用描述
 * @Author :  Markburt
 * @CreateDate :  2020/3/7$ 下午 11:57$
 * @UpdateUser :  Markburt
 * @UpdateDate :  2020/3/7$ 下午 11:57$
 * @UpdateRemark :  Project Build
 * @Version :  1.0
 */
@Component
public class TestKafkaListener implements KafkaListener {

    @Override
    public String topic() {
        return "topic.test";
    }

    @Override
    public void onMessage(ConsumerRecord data, Consumer consumer) {
        System.out.println("===接收到的消息为===》"+data);
    }



    @Override
    public void onMessage(Object o) {

    }
}
